#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

// 根据成绩打出评分
int main() 
{
	int a = 0;
	while (scanf("%d", &a) != EOF) 
	{
		if (a > 0 || a < 100) 
		{
			switch (a / 10)
			{
			case 10:
			case 9:
				printf("A\n");
				break;
			case 8:
			case 7:
				printf("B\n");
				break;
			case 6:
				printf("C\n");
				break;
			default:
				printf("D\n");
				break;
			}
		}
		else 
		{
			printf("请输入正确成绩");
		}
	}
	return 0;
}